package cn.lin.spring.test2;

import cn.lin.spring.test.ServiceA;
import cn.lin.spring.test.SourceHelper;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

@SpringBootApplication
public class ParentCtx {

    public static void main(String[] args) {
        SpringApplication application = new SpringApplication(ParentCtx.class);
        ConfigurableApplicationContext ctx = application.run(args);
        ctx.refresh();
        ctx.getBean(ServiceA.class).sayByA("hh");
        ctx.getBean(ServiceD.class).sayByD("dd");
        System.out.println("----------------------");
    }

}
